package educrypt.io;

public class CSVFile {
	private final static String SEPARATOR = ";";
	private final static String ENDLINE = "\n";
	private static StringBuffer data;

	public CSVFile() {
		data = new StringBuffer();
	}

	public void addRow(String[] values) {
		for (String value : values) {
			data.append("\"");
			data.append(value);
			data.append("\"");
			data.append(SEPARATOR);
		}
		data.append(ENDLINE);
	}

	public String getCSV() {
		return data.toString();
	}
}
